<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>日期</title>
	<script>
		//1970 1 1 0 0 0
		// 时间戳  345034534  43563543
		
		// '2018-09-26'  '2018-09-20'

		now = new Date();

		yudan = new Date("2019-01-01 0:0:0");

		day = new Date('1986-12-21');

		// console.log(day.getDay());

		// console.log((now.getTime()-day.getTime())/1000/86400);
		// 
		
		now = new Date();

		yundan = new Date('2018-01-01 0:0:0');

		console.log(yundan);

		cn =0;
		for (var i = yundan.getTime(); i <= now.getTime(); i+=86400000) {
			date = new Date(i);

			if(date.getDay()==0){
				cn++;
			}
		}

		console.log(cn);


	</script>
</head>
<body>
	
</body>
</html>